#ifndef WEBSOCKETSERVER_H
#define WEBSOCKETSERVER_H

#include <libwebsockets.h>
#include <string>

class WebSocketServer {
public:
    WebSocketServer(int port);
    ~WebSocketServer();

    void run();

private:
    static int callback(struct lws *wsi, enum lws_callback_reasons reason,
                        void *user, void *in, size_t len);

    struct lws_context *context;
    struct lws_protocols protocols[2];
    int port;
};

#endif // WEBSOCKETSERVER_H